<?php

/**
 * itemescotizaciones actions.
 *
 * @package    dirsac
 * @subpackage itemescotizaciones
 * @author     Miguel Flores
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class itemescotizacionesActions extends autoitemescotizacionesActions
{
  public function executeAdd(sfWebRequest $request){
    $this->forward404unless($request->isXmlHttpRequest());
    $number = intval($request->getParameter("num"));

    //$this->form = new EventForm();
    $this->form = new ItemCotizacionNacionalForm();

    $this->form->addNewFields($number);

    return $this->renderPartial('addNew',array('form' => $this->form, 'number' => $number));
  }

  public function executeNew(sfWebRequest $request){
    //$event = new Event();
    $item = new ItemCotizacionNacional();
    
    //$this->form = new EventForm($event);
    $this->form = new ItemCotizacionNacionalForm($item);

    $this->form->addNewFields(0);

    $this->setTemplate('edit');
  }
}
